<?php

require_once(ROOT . '/application/models/Page.php');
require_once(ROOT . '/library/controller.class.php');

class PageController extends Controller {

	
	
	function display($template = null) {
	
		if(isset($content)){
			$this->smarty->assign("content", $content);
			
		} else {
			$this->smarty->assign("content", "main_content");
		}
		
		$this->smarty->display('index.tpl');
	}
	
	/*function viewall() {

		$this->set('title','All Items - My Todo List App');
		$this->set('todo',$this->Item->selectAll());
	}
	
	function add() {
		$todo = $_POST['todo'];
		$this->set('title','Success - My Todo List App');
		$this->set('todo',$this->Item->query('insert into items (item_name) values (\''.mysql_real_escape_string($todo).'\')'));	
	}
	
	function delete($id = null) {
		$this->set('title','Success - My Todo List App');
		$this->set('todo',$this->Item->query('delete from items where id = \''.mysql_real_escape_string($id).'\''));	
	}*/

}
